# $Id: PKGBUILD 197167 2013-10-23 13:51:52Z pierre $
# Maintainer: Pierre Schmitz <pierre@archlinux.de>
# Contributor: François Charette <firmicus@gmx.net>

pkgname=xz
pkgver=5.0.5
pkgrel=2
pkgdesc='Library and command line tools for XZ and LZMA compressed files'
arch=('i686' 'x86_64' 'sh4')
url='http://tukaani.org/xz/'
license=('GPL' 'LGPL' 'custom')
depends=('sh')
source=("http://tukaani.org/${pkgname}/${pkgname}-${pkgver}.tar.gz"
        "http://tukaani.org/${pkgname}/${pkgname}-${pkgver}.tar.gz.sig")
md5sums=('19d924e066b6fff0bc9d1981b4e53196'
         'SKIP')

build() {
	cd ${srcdir}/${pkgname}-${pkgver}

	./configure --prefix=/usr \
		--disable-rpath
#		--enable-werror
	make
}

check() {
	cd ${srcdir}/${pkgname}-${pkgver}
	make check
}

package() {
	cd ${srcdir}/${pkgname}-${pkgver}
	make DESTDIR=${pkgdir} install
	install -d -m755 ${pkgdir}/usr/share/licenses/xz/
	ln -sf /usr/share/doc/xz/COPYING ${pkgdir}/usr/share/licenses/xz/
	ln -sf /usr/share/licenses/common/GPL2/license.txt ${pkgdir}/usr/share/doc/xz/COPYING.GPLv2
}
